<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="cn.edu.cqvie.ssm.entity.User" %>
<%@ page import="cn.edu.cqvie.ssm.model.impl.UserModelImpl" %>
<%@ page import="cn.edu.cqvie.ssm.model.UserModel" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>控制页面</title>
</head>
<body>
<%
try{
	String name=request.getParameter("name");
	String psw=request.getParameter("psw");
	User user = new User();
	user.setName(name);
	user.setPassword(psw);
	UserModel us=new UserModelImpl();
	us.save(user);
	response.sendRedirect("list.jsp");
}catch(Exception e){
	response.sendRedirect("save.jsp");
}
	
	
%>
</body>
</html>